package main

import (
    //"fmt"
	"thirdpaysdk/api/allinpay"
	"github.com/astaxie/beego"
	//"io/ioutil"
)

func microApp() {
	custId := "10000000050"
	appId := ""
	subAppid := ""
	secreCode := "MIGfMA0GCSqGSIb3DQEBAQUAA4GNAgQCXaLnL8jFJgQ1DSqtvZVo9E0"
	orderId := "50130000008107"
	body := "测试商品"
	amount := 100
	notifyUrl := "https://api.dhfapp.com" + "/public/allinpay/notify"
	openId := "oQlEQ0RqFx7ufQUbkrNB8xouAgDI"
	rsp, err := allinpay.MicroAppPay(custId,appId,orderId,body,openId,notifyUrl,subAppid,secreCode,amount)
	if err != nil {
	   beego.Debug("MicroAppPay error:", err.Error())
	   return
	}
	beego.Debug("MicroAppPay Rsp:", string(rsp))
}

